package com.erp.entity.goods;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 期初
 */
public class Beginning {
    private Integer beginningId;     // 主键
    private Integer warehouseId;     // 仓库ID
    private Integer qty;             // 期初数量
    private BigDecimal cost;         // 单位成本
    private BigDecimal total;        // 期初总价
    private Integer goodsId;         // 商品ID
    private Integer companyId;       // 公司ID
    private String batch;            // 批次号
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date produceDate;        // 生产日期

    private Integer qualityDays;      //保质期（天）
    private String goodsOrigin;      // 产地
    private String goodsRegistrationCode; // 注册证号
    private String goodsProductionCode;   // 生产许可证

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date validUtil;     //有效期至


    private List<SerialNumber> serialNumbers; //序列号列表


    public Beginning() {
    }

    public Beginning(Integer beginningId, Integer warehouseId, Integer qty, BigDecimal cost, BigDecimal total, Integer goodsId, Integer companyId, String batch, Date produceDate, Integer qualityDays, String goodsOrigin, String goodsRegistrationCode, String goodsProductionCode, Date validUtil, List<SerialNumber> serialNumbers) {
        this.beginningId = beginningId;
        this.warehouseId = warehouseId;
        this.qty = qty;
        this.cost = cost;
        this.total = total;
        this.goodsId = goodsId;
        this.companyId = companyId;
        this.batch = batch;
        this.produceDate = produceDate;
        this.qualityDays = qualityDays;
        this.goodsOrigin = goodsOrigin;
        this.goodsRegistrationCode = goodsRegistrationCode;
        this.goodsProductionCode = goodsProductionCode;
        this.validUtil = validUtil;
        this.serialNumbers = serialNumbers;
    }

    /**
     * 获取
     * @return beginningId
     */
    public Integer getBeginningId() {
        return beginningId;
    }

    /**
     * 设置
     * @param beginningId
     */
    public void setBeginningId(Integer beginningId) {
        this.beginningId = beginningId;
    }

    /**
     * 获取
     * @return warehouseId
     */
    public Integer getWarehouseId() {
        return warehouseId;
    }

    /**
     * 设置
     * @param warehouseId
     */
    public void setWarehouseId(Integer warehouseId) {
        this.warehouseId = warehouseId;
    }

    /**
     * 获取
     * @return qty
     */
    public Integer getQty() {
        return qty;
    }

    /**
     * 设置
     * @param qty
     */
    public void setQty(Integer qty) {
        this.qty = qty;
    }

    /**
     * 获取
     * @return cost
     */
    public BigDecimal getCost() {
        return cost;
    }

    /**
     * 设置
     * @param cost
     */
    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    /**
     * 获取
     * @return total
     */
    public BigDecimal getTotal() {
        return total;
    }

    /**
     * 设置
     * @param total
     */
    public void setTotal(BigDecimal total) {
        this.total = total;
    }

    /**
     * 获取
     * @return goodsId
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * 设置
     * @param goodsId
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    /**
     * 获取
     * @return companyId
     */
    public Integer getCompanyId() {
        return companyId;
    }

    /**
     * 设置
     * @param companyId
     */
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    /**
     * 获取
     * @return batch
     */
    public String getBatch() {
        return batch;
    }

    /**
     * 设置
     * @param batch
     */
    public void setBatch(String batch) {
        this.batch = batch;
    }

    /**
     * 获取
     * @return produceDate
     */
    public Date getProduceDate() {
        return produceDate;
    }

    /**
     * 设置
     * @param produceDate
     */
    public void setProduceDate(Date produceDate) {
        this.produceDate = produceDate;
    }

    /**
     * 获取
     * @return qualityDays
     */
    public Integer getQualityDays() {
        return qualityDays;
    }

    /**
     * 设置
     * @param qualityDays
     */
    public void setQualityDays(Integer qualityDays) {
        this.qualityDays = qualityDays;
    }

    /**
     * 获取
     * @return goodsOrigin
     */
    public String getGoodsOrigin() {
        return goodsOrigin;
    }

    /**
     * 设置
     * @param goodsOrigin
     */
    public void setGoodsOrigin(String goodsOrigin) {
        this.goodsOrigin = goodsOrigin;
    }

    /**
     * 获取
     * @return goodsRegistrationCode
     */
    public String getGoodsRegistrationCode() {
        return goodsRegistrationCode;
    }

    /**
     * 设置
     * @param goodsRegistrationCode
     */
    public void setGoodsRegistrationCode(String goodsRegistrationCode) {
        this.goodsRegistrationCode = goodsRegistrationCode;
    }

    /**
     * 获取
     * @return goodsProductionCode
     */
    public String getGoodsProductionCode() {
        return goodsProductionCode;
    }

    /**
     * 设置
     * @param goodsProductionCode
     */
    public void setGoodsProductionCode(String goodsProductionCode) {
        this.goodsProductionCode = goodsProductionCode;
    }

    /**
     * 获取
     * @return validUtil
     */
    public Date getValidUtil() {
        return validUtil;
    }

    /**
     * 设置
     * @param validUtil
     */
    public void setValidUtil(Date validUtil) {
        this.validUtil = validUtil;
    }

    /**
     * 获取
     * @return serialNumbers
     */
    public List<SerialNumber> getSerialNumbers() {
        return serialNumbers;
    }

    /**
     * 设置
     * @param serialNumbers
     */
    public void setSerialNumbers(List<SerialNumber> serialNumbers) {
        this.serialNumbers = serialNumbers;
    }

    public String toString() {
        return "Beginning{beginningId = " + beginningId + ", warehouseId = " + warehouseId + ", qty = " + qty + ", cost = " + cost + ", total = " + total + ", goodsId = " + goodsId + ", companyId = " + companyId + ", batch = " + batch + ", produceDate = " + produceDate + ", qualityDays = " + qualityDays + ", goodsOrigin = " + goodsOrigin + ", goodsRegistrationCode = " + goodsRegistrationCode + ", goodsProductionCode = " + goodsProductionCode + ", validUtil = " + validUtil + ", serialNumbers = " + serialNumbers + "}";
    }
}
